#: import environ os.environ
#: import gch kivy.utils.get_color_from_hex


<RallyRegisterScreen>
    canvas:
        Color:
            rgba: gch("33333d")
        Rectangle:
            pos: self.pos
            size: self.size

    MDBoxLayout:
        adaptive_height: True
        orientation: "vertical"
        spacing: dp(80)
        padding: dp(30)
        pos_hint: {"center_x": .5}

        Image:
            source: f"{environ['RALLY_ROOT']}/assets/images/logo.png"
            pos_hint: {"center_x": .5}
            size_hint: None, None

        MDBoxLayout:
            adaptive_height: True
            orientation: "vertical"
            spacing: dp(20)

            RallyTextField:
                hint_text: "Username"

            RallyTextField:
                hint_text: "Password"
                password: True
                password_mask: "•"

        MDBoxLayout:
            adaptive_height: True
            orientation: "vertical"
            spacing: dp(20)

            MDIconButton:
                icon: 'fingerprint'
                pos_hint: {"center_x": .5}
                user_font_size: dp(62)
                _no_ripple_effect: True
                on_release: root.parent.current = "rally root screen"

            MDTextButton:
                text: "Or Login with Touch ID"
                pos_hint: {"center_x": .5}


<RallyTextField@MDTextField>
    mode: 'fill'
    line_anim: False
    fill_color: (0, 0, 0, .4)
